package com.aqiang.day0421.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.aqiang.day0421.R;
import com.aqiang.day0421.entity.XiaEntity;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

public class TwoAdapter extends BaseQuickAdapter<XiaEntity.DataBean, BaseViewHolder> {
    public TwoAdapter(int layoutResId, @Nullable List<XiaEntity.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, XiaEntity.DataBean item) {
        helper.setText(R.id.item_name_tv,item.getTitle());
        helper.setText(R.id.item_title_tv,item.getFood_str());
        Glide.with(mContext)
                .load(item.getPic())
                .into((ImageView) helper.getView(R.id.item_iv));
    }
}
